import sys
sys.path.append("..")
import numpy as np
from tensor import Tensor
from time import time

# imgShape = (1024,28,28)
# kernelShape = (3,3)
# a = np.random.random(imgShape)
# kernels = np.random.random(kernelShape)


# loops = 1

# A = Tensor(imgShape)
# K = Tensor(kernelShape)
# A.inputValue(a)
# K.inputValue(kernels)
# out = A.conv2d(kernel=K,stride=1)

# A.forward()

# print(out.value.shape)

# st = time()
# for loop in range(loops):
# 	A.forward()
# print('im2col: ',time()-st)




# imgShape = (1024,1,28,28)
# kernelShape = (1,3,3)
# a = np.random.random(imgShape)
# kernels = np.random.random(kernelShape)


# loops = 1

# A = Tensor(imgShape)
# K = Tensor(kernelShape)
# A.inputValue(a)
# K.inputValue(kernels)
# out = A.simpleConv2d(kernels=K,stride=1)

# A.forward()

# st = time()
# for loop in range(loops):
# 	A.forward()
# print('mine: ',time()-st)



loops = 1000000

a = 2.1
st = time()
for i in range(loops):
	a = int(a)
print(time()-st)

a = 2.1
st = time()
for i in range(loops):
	a //= 1
print(time()-st)









